package com.sunrise.generico.entidade;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import lombok.Getter;
import lombok.Setter;

import org.hibernate.validator.constraints.NotEmpty;

import com.sunrise.generico.entidade.iface.EntidadeManter;

@Entity
@Table(name = "sms_recebida")
public class SmsRecebida implements EntidadeManter {


	/**
	 * 
	 */
	private static final long serialVersionUID = -8660149318964369708L;

	@Id
	@SequenceGenerator(name="pk_sequence",sequenceName="sms_recebida_id_seq", allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="pk_sequence")
	@javax.persistence.Column
	@Getter @Setter
	private Long id;
	
	@NotEmpty( message="{mensagemObrigatorio}")
	@Column(name = "nome", length = 250, nullable = false)
	@Getter @Setter
	private String nome;
	
	@Column(name = "celular", length = 20, nullable = false)
	@Getter @Setter
	private String celular;
	
	@Column(name = "dataEnvio")
	@Getter @Setter
	private Date dataEnvio;
	
	@Column(name = "mensagemNova")
	@Getter @Setter
	private Boolean mensagemNova;
	
	@Column(name = "mensagemRespondida")
	@Getter @Setter
	private Boolean mensagemRespondida;
	
	@Column(name = "resposta", length = 250)
	@Getter @Setter
	private String resposta;
	
	@Column(name = "enviadaResponsavel")
	@Getter @Setter
	private Boolean enviadaResponsavel;
	
	@OneToOne
	@Getter @Setter
	private RetornoSMS retorno;
	
	@Column(name = "dataResposta")
	@Getter @Setter
	private Date dataResposta;
}
